/**
 * 
 */
package ro.dta.idbi.model;

import java.util.Hashtable;
import java.util.regex.Matcher;

import ro.dta.idbi.interfaces.IPrimitiveParser;

/**
 * Table construct parser for the add,extend,delete and contract BAV
 * transformations
 * 
 * @author Tudor Dobrila
 *
 */
public class AddTableParser implements IPrimitiveParser {

	@Override
	public Hashtable<String, Object> parse(Matcher matcher) {
		Hashtable<String, Object> result = new Hashtable<String, Object>();
		result.put("type", "table");
		result.put("name", AbstractPattern.parseTableName(matcher.group(1)));
		result.put("iql", matcher.group(2));
		return result;
	}

}